<?php

/**
 * @Author: Eden
 * @Date:   2019-07-10 17:51:16
 * @Last Modified by:   Eden
 * @Last Modified time: 2019-07-10 17:52:22
 */
namespace App\Transformers;

use App\Models\Information;
use League\Fractal\TransformerAbstract;

class InformationTransformer extends TransformerAbstract
{
	public function transform(Information $information)
	{
		return [
			'id' => $information->id,
			'name' => $information->name,
			'info' => $information->info,
			'created_at' => $information->created_at->toDateTimeString(),
			'updated_at' => $information->updated_at->toDateTimeString()
		];
	}
}